package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.ruoyi.common.base.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 升级码交易记录表 code_record
 * 
 * @author ruoyi
 * @date 2019-04-08
 */
public class CodeRecord extends BaseEntity
{
	private static final long serialVersionUID = 1L;
	
	/** 主键 */
	private String id;
	/** 用户id */
	private String merchantId;
	/** 用户或代理商名称 */
	private String name;
	/** 代理商id */
	private String agentId;
	/** 交易数量 */
	private Integer count;
	/** 交易单价 */
	private BigDecimal price;
	/** 交易类型0加码1扣码 */
	private String type;
	/** 码来源id(扣码id) */
	private String fromId;
	/** 码去向id(加码id) */
	private String toId;
	/** 交易时间 */
	private Date createTime;
	/** 操作前升级码余量 */
	private String field1;
	/** 操作后升级码余量 */
	private String field2;
	/** 预留字段 */
	private String field3;
	/** 预留字段 */
	private String field4;
	/** 预留字段 */
	private String field5;

	//临时字段
	private String toName;//接收码用户名称
	private String fromName; //被扣码用户名称
	private String toUserType;//接收码用户类型
	private Long sumCount;	//总数量	
	public void setId(String id) 
	{
		this.id = id;
	}

	public String getId() 
	{
		return id;
	}
	public void setMerchantId(String merchantId) 
	{
		this.merchantId = merchantId;
	}

	public String getMerchantId() 
	{
		return merchantId;
	}
	public void setName(String name) 
	{
		this.name = name;
	}

	public String getName() 
	{
		return name;
	}
	public void setAgentId(String agentId) 
	{
		this.agentId = agentId;
	}

	public String getAgentId() 
	{
		return agentId;
	}
	public void setCount(Integer count) 
	{
		this.count = count;
	}

	public Integer getCount() 
	{
		return count;
	}
	public void setPrice(BigDecimal price) 
	{
		this.price = price;
	}

	public BigDecimal getPrice() 
	{
		return price;
	}
	public void setType(String type) 
	{
		this.type = type;
	}

	public String getType() 
	{
		return type;
	}
	public void setFromId(String fromId) 
	{
		this.fromId = fromId;
	}

	public String getFromId() 
	{
		return fromId;
	}
	public void setToId(String toId) 
	{
		this.toId = toId;
	}

	public String getToId() 
	{
		return toId;
	}
	public void setCreateTime(Date createTime) 
	{
		this.createTime = createTime;
	}

	public Date getCreateTime() 
	{
		return createTime;
	}
	public void setField1(String field1) 
	{
		this.field1 = field1;
	}

	public String getField1() 
	{
		return field1;
	}
	public void setField2(String field2) 
	{
		this.field2 = field2;
	}

	public String getField2() 
	{
		return field2;
	}
	public void setField3(String field3) 
	{
		this.field3 = field3;
	}

	public String getField3() 
	{
		return field3;
	}
	public void setField4(String field4) 
	{
		this.field4 = field4;
	}

	public String getField4() 
	{
		return field4;
	}
	public void setField5(String field5) 
	{
		this.field5 = field5;
	}

	public String getField5() 
	{
		return field5;
	}
	
	
    public String getToName() {
		return toName;
	}

	public void setToName(String toName) {
		this.toName = toName;
	}

	public String getFromName() {
		return fromName;
	}

	public void setFromName(String fromName) {
		this.fromName = fromName;
	}
	
	public String getToUserType() {
		return toUserType;
	}

	public void setToUserType(String toUserType) {
		this.toUserType = toUserType;
	}
	
	
	public Long getSumCount() {
		return sumCount;
	}

	public void setSumCount(Long sumCount) {
		this.sumCount = sumCount;
	}

	public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("merchantId", getMerchantId())
            .append("name", getName())
            .append("agentId", getAgentId())
            .append("count", getCount())
            .append("price", getPrice())
            .append("type", getType())
            .append("fromId", getFromId())
            .append("toId", getToId())
            .append("createTime", getCreateTime())
            .append("field1", getField1())
            .append("field2", getField2())
            .append("field3", getField3())
            .append("field4", getField4())
            .append("field5", getField5())
            .toString();
    }

}
